$(()=> {
    let del = $(".delete").on("click", function () {
let userName=$(this).closest("li").find(".userName").text();
let roomName=$(this).closest("li").find(".roomName").text();
let roomId=$(this).closest("li").find(".roomId").text();
let birthFrom=$(this).closest("li").find(".birthFrom").text();
let birthTo=$(this).closest("li").find(".birthTo").text();
$.ajax({
    url: ctx + "/client/delete",
    method: "post",
    dataType: "json",
    data: {
        userName,
        roomName,
        roomId,
        birthFrom,
        birthTo
    },
    success(resp) {
        if (resp.success) {
            alert("删除成功");
            location.href = ctx + "/client/message";
        } else {
            alert("删除失败");
        }
    }
});

    });
});